//
//  UICollectionReusableView.swift
//  Documentation
//
//  Created by Toj on 11/21/22.
//

open class UICollectionReusableView : UIView {
    
    
    open var reuseIdentifier: String? { get }
    
    // 在实例从重用队列返回之前由集合视图调用.
    // 子类必须调用super.
    open func prepareForReuse()
    
    
    // Classes that want to support custom layout attributes specific to a given UICollectionViewLayout subclass can apply them here.
    // This allows the view to work in conjunction with a layout class that returns a custom subclass of UICollectionViewLayoutAttributes from -layoutAttributesForItem: or the corresponding layoutAttributesForHeader/Footer methods.
    // -applyLayoutAttributes: is then called after the view is added to the collection view and just before the view is returned from the reuse queue.
    // Note that -applyLayoutAttributes: is only called when attributes change, as defined by -isEqual:.
    open func apply(_ layoutAttributes: UICollectionViewLayoutAttributes)
    
    
    // Override these methods to provide custom UI for specific layouts.
    open func willTransition(from oldLayout: UICollectionViewLayout, to newLayout: UICollectionViewLayout)
    
    open func didTransition(from oldLayout: UICollectionViewLayout, to newLayout: UICollectionViewLayout)
    
    
    @available(iOS 8.0, *)
    open func preferredLayoutAttributesFitting(_ layoutAttributes: UICollectionViewLayoutAttributes) -> UICollectionViewLayoutAttributes
}
